Skip to content

Harden package metadata normalization - #2925

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue2892-2894
Jun 2, 2026
Merged

Harden package metadata normalization#2925
Widthdom merged 4 commits into
mainfrom
fix-issue2892-2894

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cap CodeIndex.PackageNormalize ZIP entry count, declared entry sizes, total uncompressed size, XML text size, and actual inflated read budgets before rewriting packages.
  • Reject unsafe ZIP entry names before CreateEntry, including absolute paths, drive roots, traversal, backslashes, empty segments, and normalized duplicate destination names.
  • Update release-package documentation and add security changelog fragments for both issues.

Validation

  • Tests added or updated for changed behavior.
  • dotnet build
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~ReleaseWorkflowTests"
  • dotnet test --no-build (full suite; run before the final adversarial-review follow-up commits)
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review: No blocking/actionable issues found.

Documentation and changelog

  • Documentation updated: DEVELOPER_GUIDE.md
  • Changelog fragments added under changelog.d/unreleased/:
    • changelog.d/unreleased/2892.security.md
    • changelog.d/unreleased/2894.security.md
  • Fragments follow .codex/workflows/changelog-fragment.md for category, issue front matter, and bilingual sections.

Issues

Fixes #2892
Fixes #2894

Follow-up issues

  • None

@Widthdom
Widthdom merged commit 602040a into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2892-2894 branch June 2, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package normalize should reject unsafe ZIP entry names before rewriting Package normalize should cap ZIP entry count and entry sizes

1 participant